home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 …ember: Reference Library / Dev.CD Dec 00 RL Disk 1.toast / pc / technical documentation / develop / develop issue 26 / develop issue 26 code / truffles - display mgr. / superfly source / gdevicewindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-18  |  1.6 KB  |  72 lines

  1. /*
  2.     File:        GDeviceWindow.h
  3.  
  4.     Contains:    A window that displays information about a GDevice
  5.                 
  6.     Written by: Kent Miller
  7.     
  8.     Copyright:    © 1995 Apple Computer
  9.  
  10.     Change History (most recent first):
  11.      
  12.  */
  13.  
  14. #ifndef        _GDEVICEWINDOW_
  15. #define        _GDEVICEWINDOW_
  16.  
  17. #ifndef        _WINDOW_
  18. #include    "Window.h"
  19. #endif
  20.  
  21. #ifndef        _DISPLAYS_
  22. #include    <Displays.h>
  23. #endif
  24.  
  25. #ifndef        _PALETTES_
  26. #include    <Palettes.h>
  27. #endif
  28.  
  29. #define Max(x,y) (x > y) ? x:y;
  30. #define Min(x,y) (x < y) ? x:y;
  31.  
  32. class    TGDeviceWindow    :    public TWindow
  33.     {
  34. protected:
  35. public:
  36.                             TGDeviceWindow();
  37.     virtual                 ~TGDeviceWindow();
  38.  
  39. //Overridden methods
  40.     virtual WindowPtr        MakeNewWindow(WindowPtr behindWindow);
  41.     virtual void            Draw(void);
  42.     virtual void            Click(EventRecord * anEvent);
  43.     virtual void            Activate(Boolean activating);
  44.  
  45.     virtual void            Drag(Point startPoint);
  46.     virtual    void            AdjustMenusBeforeMenuSelection(void);
  47.  
  48. //New Methods
  49.     virtual OSErr            SetUpData(GDHandle theGD);
  50.     virtual    void            WindowOnDevice(void);
  51.  
  52. protected:
  53. //variables
  54.     DisplayIDType        theID;  //Even though GDHandles might change, the Display Manager
  55.                                 //ID will always remain the same.  If this window is on
  56.                                 //a mirrored device, this will be the ID of the first device
  57.                                 //that had the mirrored space when the window was created.
  58.  
  59.     };
  60.  
  61. pascal void GDeviceWindowDrawingProc (    SInt16        depth,
  62.                                         SInt16        deviceFlags,
  63.                                         GDHandle    targetDevice,
  64.                                         SInt32        userData);
  65.  
  66. void DrawThisCStringHere(unsigned char * s, SInt16 h, SInt16 v);
  67. void DrawARamp(SInt16 depth, Rect * rampRect );
  68. void SetRampRGBColor(RGBColor * theRGB, SInt16 value, SInt16 rampColor);
  69. void DrawMiniMonitors(Rect *drawHere, GDHandle thisGDevice);
  70.  
  71. #endif
  72.